package com.resafety.rtsp2flv.controller;

import com.alibaba.fastjson.JSONObject;
import com.resafety.rtsp2flv.utils.RtspToRtmpUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class TransCodeController {

    @Autowired
    RtspToRtmpUtils rtspToRtmpUtils;

    @RequestMapping("/trans")
    public JSONObject trans(String rtsp) throws InterruptedException {
        return rtspToRtmpUtils.getRtmp(rtsp);
    }
}
